 {

        var o = require("../../../UIManager/UISoundManager.js");
        cc.Class({
            extends: cc.Component,
            properties: {
                scrollView: cc.ScrollView,
                rankSprite: cc.Sprite
            },
            onLoad: function () {
                this.friRank = null, this.content = this.scrollView.content;
            },
            start: function () {
            },
            setData: function (e, t) {
                this.friRank = e, this.shareTicket = t, this.scrollView.scrollToTop(), this.doDrawAction();
            },
            doDrawAction: function () {
                this.shareTicket ? this.showRank(Global.config.RankType.GROUP) : this.showRank(Global.config.RankType.FRIEND);
            },
            showRank: function (e) {
                console.log("=======showRank type========== :", this.rankType, e, !this.main), this.rankType == e && this.main ? console.log("不需要更新排行榜画布") : (this.rankType = e,
                    this.showRankListForShare());
            },
            showRankListForShare: function () {
                if (cc.sys.platform === cc.sys.WECHAT_GAME) {
                    this.friRank.unDraw(), console.log("获取公共数据域数据");
                    var e = wx.getOpenDataContext().canvas;
                    e.width = 531, e.height = 2270, Global.utils.searchNode(this.node, "content").height = e.height;
                    this.shareTicket ? Global.utils_Share.showGroupRank(this.shareTicket, !1) : Global.utils_Share.showFriendRank(!1),
                    e || cc.error("sharedCanvas不存在"), canvas || cc.error("canvas不存在");
                    var t = new cc.Texture2D(), n = new cc.SpriteFrame(t), o = this.rankSprite;
                    this.main = function () {
                        t.initWithElement(e), t.handleLoadedTexture(), o.spriteFrame = n, o.spriteFrame._refreshTexture(t);
                    }, this.main(), tywx.Timer.setTimer(this, this.main, .1, 50);
                }
            },
            onClickGroupRank: function () {
                if (console.log("onClickGroupRank"), o.playEffect("select"), cc.sys.platform == cc.sys.WECHAT_GAME) try {
                    var e = this;
                    wx.updateShareMenu({
                        withShareTicket: !0,
                        success: function (t) {
                            console.log("share: tuyoo onClickGroupRank success, params:" + JSON.stringify(t));
                            var n = JSON.stringify({
                                groupRank: 1
                            }), o = {
                                share_type: Global.config.sharePointId.groupRank
                            };
                            tywx.PropagateInterface.getWeightShareConfigInfoByTypeWithShare(o, n, function (t) {
                                console.log("onClickGroupRank succCallback");
                                var n = {
                                    text: "请在微信聊天窗口中点击查看群排行",
                                    confirmText: "确定",
                                    confirmSp: Global.spriteAtlas.getOKSpf(),
                                    needCloseBtn: !1
                                };
                                Global.UIPopupManager.alert(n), e.friRank && e.friRank.hideBigRank();
                            });
                        }.bind(this),
                        fail: function (e) {
                            console.log("share: tuyoo onClickGroupRank fail, params:" + JSON.stringify(e));
                        }
                    });
                } catch (e) {
                    console.log(" wx.updateShareMenu 出错了---\x3e"), console.log(e);
                }
            },
            setRankTypeByShareTicket: function (e) {
                this.shareTicket = e, this.doDrawAction();
            },
            unDraw: function (e) {
                this.main && e != this.rankType && tywx.Timer.cancelTimer(this, this.main);
            },
            onDestroy: function () {
                this.unDraw(this.rankType), Global.notificationCenter.offAll(this);
            }
        })
    }